package com.service.Impl;

import com.dao.Impl.NewsDaoImpl;
import com.dao.NewsDao;
import com.entity.News;
import com.factory.SimpleDaoFactory;
import com.service.NewsService;

public class NewServiceImpl implements NewsService {
//    private NewsDao dao = SimpleDaoFactory.getInstance();
    private NewsDao dao;
    public NewsDao getDao() {
        return dao;
    }

    public void setDao(NewsDao dao) {
        this.dao = dao;
    }

    @Override
    public void save(News news) {
        dao.save(news);
    }
}
